package com.example.demo;

/**
 * •@Package: heNan
 * •@ClassName: AESUtil
 * •@Author: wangxin
 * •@CreateTime: 2022/11/15 16:02
 * •@Description:
 */
public class AESUtil {

    public static String bytesToHexString(byte[] b)
    {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < b.length; ++i)
        {
            String hex = Integer.toHexString(b[i] & 0xFF);
            if (hex.length() == 1)
            {
                hex = new StringBuilder().append('0').append(hex).toString();
            }
            sb.append(hex);
        }
        return sb.toString();
    }

}
